<?php
namespace App\Http\Controllers\Mp;

use Illuminate\Support\Facades\Cache;

/**
 * Class QrcodeController
 * @package App\Http\Controllers\Mp
 * @author zjw\
 */
class QrCodeController extends BaseController{

    public function index(){
        $text = random_int(1000000000,(int)9999999999);
        Cache::put((string)$text,\Auth::user()->id, now()->addMinute(5));
        return [
            'code'=> $text
        ];
    }
}
